<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<th:block th:replace="headfoot/head::head_common">引用公共的homefoot</th:block>
</head>
<body>
	<!-- 最外层DIV  kj-list-container -->
	<div class="container-fluid kj-list-container">
		<!-- 内容容器  kj-list-content-container -->
		<div class="kj-list-content-container card">
			<!-- 搜索区域使用样式类 kj-list-queryFrom -->
			<form id="queryForm"
				class="form-horizontal kj-list-queryFrom">
				
				<!-- 搜索条件容器 kj-list-queryFrom-container -->
				<div class="kj-list-queryFrom-container">
					<!-- 搜索条件条目 kj-list-queryFrom-item -->
					<div class="kj-list-queryFrom-item">
						<div class="form-group col-sm-12">
							<!-- 列表搜索区域 lable 使用 kj-list-query-label 样式类，增加title -->
							<label
								class="col-sm-1 control-label kj-list-query-label"
								title="登录名"
							>登录名</label>
							<div class="col-sm-2">
								<input
									type="text"
									class="form-control input-sm"
									name="userName"
									placeholder="登录名" />
							</div>

							<label
								class="col-sm-1 control-label kj-list-query-label"
								title="姓名"
							>姓名</label>
							<div class="col-sm-2">
								<input
									type="text"
									class="form-control input-sm"
									name="name"
									placeholder="姓名" />
							</div>

							<label
								class="col-sm-1 control-label kj-list-query-label"
								title="性别"
							>性别</label>
							<div class="col-sm-2">
								<input
									type="text"
									class="form-control input-sm"
									name="gender"
									placeholder="性别" />
							</div>

							<label
								class="col-sm-1 control-label kj-list-query-label"
								for=""
								title="所属部门"
							>所属部门</label>
							<div class="col-sm-2">
								<input
									type="text"
									class="form-control input-sm"
									name="fkOrganizationId"
									placeholder="所属部门" />
							</div>
						</div>
									
						<div class="form-group col-sm-12">
							<label
								class="col-sm-1 control-label kj-list-query-label"
								title="境内外标识"
							>是否锁定</label>
							<div class="col-sm-2">
								<select
									class="form-control input-sm"
									name="locked"
								>
									<option value="">请选择</option>
									<option value="0">否</option>
									<option value="1">是</option>
								</select>
							</div>
							
							<div class="col-sm-6"></div>
							<div class="col-sm-3 kj-list-query-btn-container">
								<button
									type="button"
									class="btn btn-sm btn-default kj-btn-query query"
								>
									<i class="iconfont icon-chaxun"></i> 查询
								</button>
								<button
									type="button"
									class="btn btn-sm btn-default kj-btn-reset reset"
									>
									<i class="iconfont icon-zhongzhi"></i>重置
								</button>
                            </div>
						</div>
					</div>
				</div>
				
				<!-- 收起展开按钮 -->
                <div class="kj-packUpdiv"
                	><span class="kj-packUp-span"
                		><i
	                		id="kj_slideBtn"
	                		class="kj-packUpdiv-icon kj-icon-shou-by-listpage"
	                		onclick="common.slideSearchDiv();"
                		></i
                	></span
                ></div>

				<!-- 列表上方按钮区域 使用 kj-list-content-btn-container 样式类 -->
				<div
					id="kj_list_content_btn_container"
					class="kj-list-content-btn-container form-group col-sm-12">
					
					
                   	<!-- 每个按钮类型增加了不同的类（kj-btn-add、kj-btn-del、kj-btn-query、kj-btn-reset），
                   	为预留样式类，当前类并无内容，为了以后修改不同样式做准备，
                   	如有不同类型创建统一名称类，后全部按照此类型添加按钮 -->
                   	<button
						type="button"
						class="btn btn-sm btn-default add-multitab kj-btn-add"
						data-id="add-user-form"
						data-url="/system/user/userForm"
						data-title="新增用户"
						kjlink:auth="system.user.add"
					>
						<i class="iconfont icon-tianjia"></i>&ensp;添加
					</button>

					<button
						class="btn btn-sm btn-default kj-btn-del bootable-action-post"
						type="button"
						data-table="#table"
						data-href="/system/user/batchDelete"
						data-confirm="确认删除吗"
						kjlink:auth="system.user.delete"
					>
						<i class="iconfont icon-shanchu"></i>&ensp;删除
					</button>
				</div>
			</form>

			<!-- 增加属性 data-height 使列表高度固定，内容超出自动增加行内滚动条。此处值为内容区域页面高度减去边距（上15下15共计30）。 -->
			<table
				id="table"
				class="table table-bordered table-hover table-striped bootstrapTable kj-list-container-only-table"
				data-list-url="/system/user/list"
				data-form-url="/system/user/userForm"
				data-del-url="/system/user/delete"
				data-toolbar="#queryForm"
				data-height="600"
			>
				<thead>
					<tr>
						<th data-checkbox="true"></th>
						<th data-field="userName" data-sortable="true">登录名</th>
						<th data-field="name" data-sortable="true">姓名</th>
						<th data-field="gender" data-sortable="true">性别</th>
						<th data-field="locked" data-sortable="true">是否锁定</th>
						<th data-field="memo" data-sortable="true">描述</th>
						<th data-field="enableFlag" data-formatter="showEnbale"
							data-sortable="true">状态</th>
						<th data-field="createDate" data-sortable="true">创建时间</th>
						<th data-field="lastUpdateDate" data-sortable="true">最后修改时间</th>
						<th data-field="operate" data-formatter="defaultOperate"
							data-events="defaultOperateEvent">操作</th>
					</tr>
				</thead>
			</table>
		</div>
	</div>
	
	<script th:inline="javascript" type="text/javascript">
        function selectCustomerType() {
        	common.confirm('<table class="table table-bordered table-hover table-striped"style="text-align: center;"><thead><tr><td>选项</td><td>客户类型</td><td>描述</td></tr></thead><tbody><tr><td><input type="radio" name="select-customer-type" value="01" checked/></td><td>企业客户</td><td style="text-align: left;">法人客户，为从事一般经营的企事业单位</td></tr><tr><td><input type="radio" name="select-customer-type" value="02" /></td><td>个人客户</td><td style="text-align: left;">自然人客户，一般为从事个体经营的个体工商户，也可以是一般消费者</td></tr></tbody></table>', function() {
        		var customerType = document.querySelectorAll("[name='select-customer-type']:checked")[0].value;
        		if (customerType == "01") {
        			document.querySelector("#addEnterpriseCustomer").click();
        		} else {
        			document.querySelector("#addIndividualCustomer").click();
        		}
        	}, {title: '新增客户类型', closeIcon: true,columnClass: 'col-md-10 col-md-offset-1'});
        }
    </script>
	
	<th:block th:replace="headfoot/foot::list_foot">引用公共的homefoot</th:block>  

</body>
</html>